.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #ffffff;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 100;
  /* 添加以下代码确保子元素垂直居中 */
  box-sizing: border-box; 
}

.nav-brand {
  margin-left: 20px; 
  display: flex; 
  align-items: center; 
}

.nav-links {
  display: flex;
  gap: 2rem;
  /* 确保链接垂直居中 */
  align-items: center; 
}

.auth-buttons {
  display: flex;
  gap: 1rem;
  /* 确保按钮垂直居中 */
  align-items: center; 
  /* 增加右外边距负值，让按钮右移 */
  margin-right: -150px; 
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: bold;  /* 将500改为bold */
  padding-bottom: 4px;
  transition: color 0.2s, border-bottom 0.2s;
}

.nav-links a.active {
  font-weight: bold;
  border-bottom: 3px solid #ff2d2d;
  color: #ff2d2d;
}

.nav-links a:hover {
  color: #ff2d2d;
}

.nav-brand-text {
  color: #000000;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.6rem;
  display: flex;        /* 改为flex布局 */
  align-items: center;  /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  width: 100%;          /* 确保居中生效 */
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}

.btn-signin {
  color: #ff2d2d;
  border: 1px solid #ff2d2d;
  background: #fff;
  transition: background 0.2s, color 0.2s;
}
.btn-signin:hover {
  background: #ff2d2d;
  color: #fff;
}

.btn-register {
  background-color: #ff2d2d;
  color: white;
  border: 1px solid #ff2d2d;
  transition: background 0.2s, color 0.2s;
}
.btn-register:hover {
  background: #fff;
  color: #ff2d2d;
}

.main-content {
  flex: 1;
  padding: 2rem;
}


.language-selector {
  margin-left: 20px;
}

.language-dropdown {
  padding: 5px 10px;
  border: none; 
  border-radius: 4px;
  cursor: pointer;
  outline: none; 
}

/* 某些浏览器可能需要额外的样式来实现悬停效果 */
.language-dropdown option:hover {
  background-color: red;
  color: white;
}

.language-dropdown option:checked,
.language-dropdown option:active {
  background-color: red !important;
  color: white !important;
}

/* 针对 Chrome 和 Safari 浏览器调整下拉框弹出位置 */
.language-dropdown::-webkit-scrollbar {
  width: 0;
}

.language-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.language-dropdown::-webkit-scrollbar-thumb {
  background: transparent;
}

/* 针对 Firefox 浏览器调整下拉框弹出位置 */
.language-dropdown {
  scrollbar-width: none;
}


